import React, { useEffect, useState } from 'react';
import { Pagination } from 'antd'

const MyPagination: React.FC<any> = (props) => {
  const { current, total, onChange } = props;


  return <div style={{ background: '#fff', textAlign: 'right', padding: '0 12px 20px 0' }}>
    <Pagination
      current={current}
      pageSize={20}
      onChange={onChange}
      total={total}
      showSizeChanger={false}
      hideOnSinglePage={total === 0}
      size="small"
      showTotal={(totalCount, range) => totalCount > 0 ? `第 ${range[0]}-${range[1]} 条/总共 ${totalCount} 条` : null}
    />
  </div>
}

export default MyPagination;
